# Maintainer: Giovanni Scafora <giovanni@archlinux.org>

pkgname=unshield
pkgver=1.5.1
pkgrel=2
pkgdesc="Extracts CAB files from InstallShield installers"
arch=('loong64' 'x86_64')
url="https://github.com/twogood/unshield"
license=('custom')
depends=('zlib' 'openssl')
makedepends=('cmake')
source=("$pkgname-$pkgver.tar.gz::https://github.com/twogood/unshield/archive/$pkgver.tar.gz")
sha256sums=('34cd97ff1e6f764436d71676e3d6842dc7bd8e2dd5014068da5c560fe4661f60')

build() {
  cd "$srcdir"/${pkgname}-${pkgver}
  cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    .
  make
}

package() {
  cd "$srcdir"/${pkgname}-${pkgver}
  make DESTDIR="$pkgdir" install
  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/unshield/LICENSE
}
